import request from '@/utils/request'
import { download } from '@/utils/request'

// 新增共同题
export function addGt(data) {
  return request({
    url: '/businessCore/faCommonQuestions',
    method: 'post',
    data
  })
}

// 修改共同题
export function updateGt(data) {
  return request({
    url: '/businessCore/faCommonQuestions',
    method: 'put',
    data
  })
}

// 删除共同题
export function delGt(id) {
  return request({
    url: '/businessCore/faCommonQuestions/' + id,
    method: 'delete'
  })
}

// 获取共同题
export function getGt(id) {
  return request({
    url: '/businessCore/faCommonQuestions/' + id,
    method: 'get'
  })
}

// 导出共同题
export function exportGt(params, fileName) {
  const url = '/businessCore/faCommonQuestions/export'
  download(
    url,
    params,
    fileName + `_${new Date().getTime()}.xlsx`
  )
}